/**操作删除激活*/


/**表格刷新*/
function tableRefresh(dataUrl){
	
	table.bootstrapTable('refresh',{url:dataUrl});

}
/**open addPage*/
function openAddPage(title,height,width,addUrl,refreshUrl){
	$("#isRefresh").val('0');
	//iframe层
	layer.open({
	  type: 2,
	  title: title,
	  closeBtn: "1",
	  shadeClose: true,
	  shade: [0],
	  shift: 2,
	  area: [width,height],
	  content: addUrl,
	  end: function(){
  				tableRefresh(refreshUrl)
       }
	}); 
}

/**open selectPage*/
function openSelectPage(title,height,width,pageUrl,fun){
	//iframe层
	layer.open({
		type: 2,
		title: title,
		closeBtn: "1",
		shadeClose: true,
		shade: [0],
		shift: 2,
		area: [width,height],
		content: pageUrl,
		end: function(){
		}
	}); 
}

/**open addPage*/
function openAddPage1(title,height,width,addUrl,refreshUrl){
	//iframe层
	layer.open({
	  type: 2,
	  title: title,
	  closeBtn: "1",
	  shadeClose: true,
	  btn: ['提交', '取消'],
	  shade: [0],
	  shift: 2,
	  area: [width,height],
	  content: addUrl,
	  yes: function(index, layero){
			
	      var iframeWin = window[layero.find('iframe')[0]['name']]; //得到iframe页的窗口对象，执行iframe页的方法：iframeWin.method();
			
	  		 iframeWin.submitContract();
	  		 
	  		layer.closeAll();
			
		},
	  btn2: function(){
			layer.closeAll();
	  }
	});
}



function activatedStatus(value){
	if(value =='1'){
		return "<p class'text-info'>激活</p>";
	}else if(value=='0'){
		return "<p class'text-danger'>停用</p>";
	}else{
		return "<p class'text-warning'>未知</p>";
	}
}




